
package com.jf.cloud.biz.controller.app;


import com.jf.cloud.biz.service.AttachFileService;
import com.jf.cloud.biz.vo.AttachFileVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 上传文件记录表
 *
 * @author zz
 * @date 2020-11-21 10:21:40
 */
@RestController("appAttachFileController")
@RequestMapping("/attach_file")
@Tag(name = "app-文件记录表")
public class AttachFileController {

    @Autowired
    private AttachFileService attachFileService;

    @GetMapping("/get_file_by_id")
    @Operation(summary = "根据文件id获取文件信息")
    public ServerResponseEntity<AttachFileVO> getFileById(Long fileId){
        AttachFileVO attachFileVO = attachFileService.getById(fileId);
        return ServerResponseEntity.success(attachFileVO);
    }

}
